#!/bin/bash

p=$1
if [ -z "$p" ]; then
    p=$(dirname $(readlink -f "$0"))
    cd $p;
fi
find . ! -path . -maxdepth 1 -type d | xargs -L 1 bash -c 'cd "$0" && pwd && git fetch --all '
